package ddemo.service;

import ddemo.dao.ParkinglotMapper;
import ddemo.factory.MapperProxyFactory;
import ddemo.pojo.Parkinglot;

import java.util.ArrayList;
import java.util.List;

public class ParkinglotService {
    static ParkinglotMapper parkinglotMapper= MapperProxyFactory.getMapper(ParkinglotMapper.class);
    public static List<Parkinglot> searchParkinglots(){
        return parkinglotMapper.searchParkinglots();
    }

    public static int UpdateStatus(String usestatus , Integer id, Integer userid) {
        return parkinglotMapper.UpdateStatus(usestatus,id,userid);

    }

    public static List<Parkinglot> getCharger() {
        return parkinglotMapper.getinterface();
    }

    public static int addParkinglot(Integer parkNumber, String position) {
        return parkinglotMapper.addCharger(parkNumber,position);
    }

    public static int updateParkinglot(Integer parkNumber, String position, int parseInt) {
             return parkinglotMapper.updateParkinglot(parkNumber,position,parseInt);
    }
}
